GXGetRectangle
You can use theGXGetRectangle
function to determine the geometry of an existing rectangle shape.
gxRectangle *GXGetRectangle(gxShape source, gxRectangle *data);
source
- A reference to the rectangle shape whose geometry you want to determine.
data
- A pointer to a
gxRectangle
structure. The function copies the source shape's geometry into this structure.- function result
- A pointer to a copy of the source shape's geometry.
DESCRIPTION
TheGXGetRectangle
function copies the geometry information from the source rectangle shape into thegxRectangle
data structure pointed to by thedata
parameter. As a convenience, this function also returns a pointer to the rectangle geometry as the function result.If the source shape is not a rectangle shape, this function posts the error code
illegal_type_for_shape
.You must pass a pointer to a
gxRectangle
structure in thedata
parameter--if you passnil
for this parameter, the function posts the error codeparameter_is_nil
.ERRORS, WARNINGS, AND NOTICES
Errors out_of_memory shape_is_nil illegal_type_for_shape (debugging version) parameter_is_nil (debugging version) SEE ALSO
For general information about rectangle geometries, see "Rectangle Shapes" on page 2-20.For the definition of the
gxRectangle
structure, see page 2-106.To create a new rectangle shape, use the
GXNewRectangle
function, which is described on page 2-114.To determine the bounding rectangle of a rectangle shape, use the
GXGetShapeBounds
function, which is described in the chapter, "Geometric Operations," in this book. (The result of theGXGetShapeBounds
function is an ordered rectangle. Therefore, the result of this function may differ from the geometry of the shape you pass in, even if that shape is a rectangle.)To change the geometry of an existing rectangle shape, use the
GXSetRectangle
function, which is described in the next section.To draw a rectangle geometry without creating a rectangle shape, use the
GXDrawRectangle
function, which is described on page 2-160. To draw a rectangle shape, use theGXDrawShape
function, which is described in the chapter "Shape Objects" in Inside Macintosh: QuickDraw GX Objects.
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help